package com.smart.draw.plantuml.controllers.render;

import net.sourceforge.plantuml.FileFormat;
import org.springframework.http.MediaType;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

/**
 * @Author xiaoqiang
 * @Version TxtController.java, v 0.1 2025年08月26日 17:00 xiaoqiang
 * @Description: TODO
 */
@RestController
@RequestMapping({"/txt"})
public class TxtController extends AbstractRenderController {

    private static final MediaType CONTENT_TYPE = MediaType.parseMediaType(MediaType.TEXT_PLAIN_VALUE + ";charset=UTF-8");

    @Override
    protected FileFormat getFileFormat() {
        return FileFormat.UTXT;
    }

    @Override
    protected MediaType getContentType() {
        return CONTENT_TYPE;
    }
}

